import { getCurrentInstance } from 'vue'
import * as commonTypes from './types/commonTypes'

// 替代vue2的this对象
export const useProxy = (): commonTypes.MyComponent => {
  const instance = getCurrentInstance()
  const proxy = instance!.proxy as commonTypes.MyComponent
  return proxy
}
